function plotRevisitTime(IC,T,u,FN,CameraAngleCapability,TU)

options=odeset('RelTol',1e-13,'AbsTol',1e-13);

to = [0:0.01:T];
Xo = IC;
[t,S] = ode113(@(t,S)CR3BP_n(t,S,u),to,Xo,options);
S = S';
% plot3(S(1,:),S(2,:),S(3,:))
[row,col,~] = size(FN);
visibility=zeros(row,col,length(t));
revisitTime = zeros(row,col);
for ii = 1:row
    for jj = 1:col
        normvec = [FN(ii,jj,1);FN(ii,jj,2);FN(ii,jj,3)];
        for k = 1:length(t)
            posvec = S(1:3,k);
            angle_temp = acosd(dot(normvec,posvec)/(norm(normvec)*norm(posvec)));
            if angle_temp < CameraAngleCapability
                visibility(ii,jj,k) = 1;
            end
        end
        ind = find(visibility(ii,jj,:)==1);
        if isempty(ind)
            revisitTime(ii,jj) = 0;
            continue
        else
            revisitTime(ii,jj) = length(ind)*0.01*TU/3600/24;
        end
    end
end

Window = figure('OuterPosition',[100,100,1500,800]); hold on;
mesh([1:row],[1:col],revisitTime,'EdgeColor','interp','FaceColor','interp');
xlabel('Longitude')
ylabel('Latitude')
title('Sun Re-visit Time')

set(gca,'fontsize',16)
xticks(linspace(0,row,5));
xticklabels({'180W','90W','0','90E','180E'});
yticks(linspace(0,col,5))
yticklabels({'90S','45S','0','45N','90N'});
xlim([1,row]);
ylim([1,col])
a=colorbar;
ylabel(a,'Accessible Time per PO period [Days]','FontSize',16,'Rotation',270);
a.Label.Position(1) = 4;

end